package com.yicong.ants.scenic.data

import androidx.lifecycle.MutableLiveData
import com.blankj.utilcode.util.ThreadUtils

class OneTimeLiveData<T> : MutableLiveData<T>() {
    override fun setValue(value: T) {
        ThreadUtils.runOnUiThreadDelayed({
            super.setValue(value)
            ThreadUtils.runOnUiThreadDelayed({
                super.setValue(null)
            }, 1)
        }, 1)
    }
}